﻿@using Janus.Cores.Tools
@model Janus.Mes.VO.SysConfigVO

@{
    Layout = null;
    var i = 1;
    ViewBag.ViewTitle = "新增-系统参数";
}
<script>
    //新增
    $(document).on("click", "#btnnew", function () {
        var html = "";
        html = $("#list").html();
        html += "<tr> "
             + "<td> <input type=\"text\" name=\"quantity\" class=\"qty input w62\" id=\"txtQty\" /></td>"
             + "<td> <input type=\"text\" name=\"quantity\" class=\"qty input w62\" id=\"txtQty\" /></td>"
             + "<td> <input type=\"text\" name=\"quantity\" class=\"qty input w62\" id=\"txtQty\" /></td>"
             + "<td> <input type=\"text\" name=\"quantity\" class=\"qty input w62\" id=\"txtQty\" /></td>"
             + '<td><a href="javascript:void(0);" class="del">删除</a></td>'
             + "</tr>"
        $("#list").html(html);
    })
    //删除
    $(document).on("click", ".del", function () {
        $(this).parent().parent().remove();
    })
</script>
<div class="pageContent">
    <form method="post" action="Manufacturing/PerSnOutIn/Create?OpID=@ViewData["OperateID"]" class="pageForm required-validate"
          onsubmit="return validateCallback(this, dialogAjaxDone);">
        @Html.ValidationSummary(true)
        <div class="pageFormContent" layouth="56">
            <input id="hidIsCreate" name="hidIsCreate" type="hidden" value="@ViewBag.IsCreate" />
            @Html.HiddenFor(model => model.Id)
            <div class="MyPanel">
                <b class="b1"></b><b class="b2 d1"></b><b class="b3 d1"></b><b class="b4 d1"></b>
                <div class="b d1 k">
                    <div class="Title">人员借调明细</div>
                    <div class="Content">
                        <p>
                            <label>
                                人员借调单号
                            </label>
                            @Html.TextBoxFor(sysConfig => sysConfig.Key, new { @Readonly = "true" })
                            @Html.ValidationMessageFor(sysConfig => sysConfig.Key)
                        </p>
                        <p>
                            <label>
                                借调时间从
                            </label>
                            <input type="text" name="date11" class="date textInput normalColor required" readonly="readonly" datefmt="yyyy-MM-dd" style="width:100px;">
                            <input type="text" name="date12" class="date textInput normalColor required" readonly="readonly" datefmt="HH:mm" style="width:50px">
                            
                        </p>
                        <p>
                            <label>
                                借调时间至
                            </label>
                            <input type="text" name="date13" class="date textInput normalColor required" readonly="readonly" datefmt="yyyy-MM-dd" style="width:100px;">
                            <input type="text" name="date14" class="date textInput normalColor required" readonly="readonly" datefmt="HH:mm" style="width:50px">
                        </p>
                        <p>
                            <label>
                                借出工作中心
                            </label>
                            @*@Html.TextBoxFor(sysConfig => sysConfig.Value)
                            <a class="btnLook" href="/Manufacturing/OutLineStockCheck/InventoryPsn" lookupgroup="org1">借出工作中心选择</a>
                            @Html.ValidationMessageFor(sysConfig => sysConfig.Value)*@
                            <input name="Workcenter.id" value="1" type="hidden">
                            <input name="Workcenter.Workcentercode" type="text" class="textInput valid required">
                            <a class="btnLook" href="Equipment/EquipmentArchives/SelectWorkcenter" lookupgroup="Workcenter">查找带回</a>
                        </p>
                        <p>
                            <label>
                                借出工作中心名称
                            </label>
                            @*@Html.TextBoxFor(sysConfig => sysConfig.Key, new { @Readonly = "true" })*@
                            <input class="readonly textInput" name="Workcenter.Workcentername" readonly="readonly" type="text">
                        </p>
                        <p>
                            <label>
                                借出审批人
                            </label>
                            @Html.TextBoxFor(sysConfig => sysConfig.Key, new { @Readonly = "" })
                        </p>
                        <p>
                            <label>
                                借出审批状态
                            </label>
                            @Html.TextBoxFor(sysConfig => sysConfig.Key, new { @Readonly = "" })
                        </p>
                        <p>
                            <label>
                                借入工作中心
                            </label>
                            @*@Html.TextBoxFor(sysConfig => sysConfig.Key, new { style = "width:180px;", @Readonly = "true" })
                            <a class="btnLook" href="/Manufacturing/OutLineStockCheck/InventoryPsn" lookupgroup="org1">借入工作中心人选择</a>
                            @Html.ValidationMessageFor(sysConfig => sysConfig.Value)*@
                            <input name="Workcenter1.id" value="1" type="hidden">
                            <input name="Workcenter1.Workcentercode" type="text" class="textInput valid required">
                            <a class="btnLook" href="Equipment/EquipmentArchives/SelectWorkcenter" lookupgroup="Workcenter1">查找带回</a>
                        </p>
                        <p>
                            <label>
                                借入工作中心名称
                            </label>
                            @*@Html.TextBoxFor(sysConfig => sysConfig.Key, new { @Readonly = "true" })*@
                            <input class="readonly textInput" name="Workcenter1.Workcentername" readonly="readonly" type="text">
                        </p>
                        <p>
                            <label>
                                借入审批人
                            </label>
                            @Html.TextBoxFor(sysConfig => sysConfig.Key, new { @Readonly = "" })
                        </p>
                        <p>
                            <label>
                                借入审批状态
                            </label>
                            @Html.TextBoxFor(sysConfig => sysConfig.Key, new { @Readonly = "" })
                        </p>
                        <p>
                            <label>
                                借出部门主管
                            </label>
                            @*@Html.TextBoxFor(sysConfig => sysConfig.Key, new { style = "width:180px;", @Readonly = "true" })
                            <a class="btnLook" href="/Manufacturing/OutLineStockCheck/InventoryPsn" lookupgroup="org1">借出部门主管选择</a>
                            @Html.ValidationMessageFor(sysConfig => sysConfig.Value)*@
                            <input name="People1.id" value="1" type="hidden">
                            <input name="People1.PeopleID" type="text" class="textInput valid required">
                            <a class="btnLook" href="Equipment/EquipmentArchives/SelectPeople" lookupgroup="People1">查找带回</a>
                        </p>
                        <p>
                            <label>
                                部门主管姓名
                            </label>
                            @*@Html.TextBoxFor(sysConfig => sysConfig.Key, new { @Readonly = "true" })*@
                            <input class="readonly textInput" name="People1.PeopleName" readonly="readonly" type="text">
                        </p>
                        <p>
                            <label>
                                申请日期
                            </label>
                            @*@Html.TextBoxFor(sysConfig => sysConfig.Key, new { @Readonly = "true" })*@
                            <input class="date textInput" readonly="readonly" id="Sdate" name="Sdate" formatdate = "@EBSHelper.SHORTDATE" type="text" value="@DateTime.Now">
                        </p>
                        <p>
                            <label>
                                借入部门主管
                            </label>
                            @*@Html.TextBoxFor(sysConfig => sysConfig.Key, new { style = "width:180px;", @Readonly = "true" })
                            <a class="btnLook" href="/Manufacturing/OutLineStockCheck/InventoryPsn" lookupgroup="org1">借入部门主管选择</a>
                            @Html.ValidationMessageFor(sysConfig => sysConfig.Value)*@
                            <input name="People.id" value="1" type="hidden">
                            <input name="People.PeopleID" type="text" class="textInput valid required">
                            <a class="btnLook" href="Equipment/EquipmentArchives/SelectPeople" lookupgroup="People">查找带回</a>
                        </p>
                        <p>
                            <label>
                                部门主管姓名
                            </label>
                            @*@Html.TextBoxFor(sysConfig => sysConfig.Key, new { @Readonly = "true" })*@
                            <input class="readonly textInput" name="People.PeopleName" readonly="readonly" type="text">
                        </p>
                        <p>
                            <label>
                                申请人
                            </label>
                            @Html.TextBoxFor(sysConfig => sysConfig.Key, new { @Readonly = "" })
                        </p>
                        <p>
                            <label>借出人数</label>

                            @Html.TextBoxFor(sysConfig => sysConfig.Key, new { @Readonly = "" })
                        </p>
                        <p>
                            <label>
                                借出总工时
                            </label>
                            @Html.TextBoxFor(sysConfig => sysConfig.Key, new { @Readonly = "" })
                            <label style="width:30px">小时</label>
                        </p>
                        <p style="width:100%;height:35px;">
                            <label>
                                借调原因：
                            </label>
                            @Html.TextBoxFor(sysConfig => sysConfig.Value, new { style = "width:70%;height:30px;", @class = "required" })
                            @Html.ValidationMessageFor(sysConfig => sysConfig.Value)
                        </p>
                        <p style="width:100%;height:35px;">
                            <label>
                                备注：
                            </label>
                            @Html.TextBoxFor(sysConfig => sysConfig.Value, new { style = "width:70%;height:30px;" })
                            @Html.ValidationMessageFor(sysConfig => sysConfig.Value)
                        </p>
                    </div>
                </div>
                <b class="b4b d1"></b><b class="b3b d1"></b><b class="b2b d1"></b><b class="b1b"></b>
            </div>
            <div class="MyPanel">
                <b class="b1"></b><b class="b2 d1"></b><b class="b3 d1"></b><b class="b4 d1"></b>
                <div class="b d1 k">
                    <div class="Title">新增人员明细</div>
                    <div class="Content">
                        <div inited="1000" style="display: block;">
                            <table class="list nowrap itemDetail" isrownum="false" addbutton="新增" width="100%" style="clear: both;">
                                <thead>
                                    <tr>
                                        @*<th width="180" type="text" name="items[#index#].itemString" size="12" fieldclass="required" fieldattrs="{remote:'validate_remote.html', maxlength:10}">工号</th>*@
                                        <th type="lookup" name="items[#index#].org.orgName" lookupgroup="items[#index#].org" lookupurl="demo/database/dwzOrgLookup.html" suggesturl="demo/database/db_lookupSuggest.html" suggestfields="orgName" postfield="keywords" size="12" fieldclass="required">工号</th>
                                        <th type="text" name="items[#index#].itemString" size="20" fieldclass="required" readonly="readonly" fieldattrs="{remote:'validate_remote.html', maxlength:10}">姓名</th>
                                        <th type="text" name="items[#index#].itemString" size="12" fieldclass="required" readonly="readonly" fieldattrs="{remote:'validate_remote.html', maxlength:10}">工时</th>
                                        <th type="text" name="items[#index#].itemString" size="25" fieldclass="" fieldattrs="{remote:'validate_remote.html', maxlength:10}">备注</th>            
                                        <th type="del" width="60">操作</th>
                                    </tr>
                                </thead>
                                <tbody></tbody>
                            </table>
                        </div>
                    </div>
                </div>
                <b class="b4b d1"></b><b class="b3b d1"></b><b class="b2b d1"></b><b class="b1b"></b>
            </div>
            <div class="MyPanel">
                <b class="b1"></b><b class="b2 d1"></b><b class="b3 d1"></b><b class="b4 d1"></b>
                <div class="b d1 k">
                    <div class="Title">附件</div>
                    <div class="Content">
                        <table class="list" width="100%">
                            <thead>
                                <tr class="header">
                                <tr>
                                    <th></th>
                                    <th colspan="2"><input type="file" id="fileID" style="float:right"></th> 
                                </tr>
                                <tr>
                                    <th>附件类型</th>
                                    <th>附件名称</th>
                                    <th type="del" width="60">操作项</th>
                                </tr>
                            </thead>
                            <tbody></tbody>
                        </table>
                    </div>
                </div>
                <b class="b4b d1"></b><b class="b3b d1"></b><b class="b2b d1"></b><b class="b1b"></b>
            </div>
            @Html.Partial("Operation", Model)
        </div>
    </form>
    @Html.Partial("FormButtonBar")
</div>



